<body>
    <div id="wrapper" class="sign-page">
        <div id="sign_form" class="form">
            <div class="avtar">
                <img src="{{logoRUL}}" />
            </div>
            <form #form="ngForm" (ngSubmit)="form.form.valid" novalidate role="form" class="sign-form">

                <!-- 注册 -->
                <div class="form-group" [ngClass]="{ 'has-error': form.submitted && !userCode.valid }">
                    <input autocomplete="off" class="form-control" type="text" id="real_name" onfocus="this.select();" value="" placeholder="姓名"
                        [(ngModel)]="user.userRealName" name="realName" #realName />
                </div>
                <div class="form-group" [ngClass]="{ 'has-error': form.submitted && !userCode.valid }">
                    <input autocomplete="off" class="form-control" type="text" id="user_name" onfocus="this.select();" value="" placeholder="账号（手机号）"
                        [(ngModel)]="user.userCode" name="userCode" userCode="CN" minlength='11' maxlength="11" #userCode="ngModel" onkeyup="value=value.replace(/[^0-9]/g,'')"
                        (change)="getInput($event.target.value)" />
                        <p id="userCode" [hidden]="userCode.valid||userCode.pristine">请输入完整的手机号码</p>
                </div>
                <div class="form-group" [ngClass]="{ 'has-error': form.submitted && !password.valid }">
                    <input autocomplete="off" class="form-control" type="password" id="password" onfocus="this.value = '';" value="password"
                        placeholder="密码" [(ngModel)]="user.password" name="password" #password="ngModel" />
                </div>
                <div class="form-group" [ngClass]="{ 'has-error': form.submitted && !password.valid }">
                    <input autocomplete="off" class="form-control" type="password" id="re_password" onfocus="this.value = '';" value="password"
                        placeholder="确认密码" [(ngModel)]="user.re_password" name="password" #password="ngModel" />
                </div>
                <!-- <p style="text-align:center">
                    {{message}}
                </p> -->
                <button id="sign" type="submit" (click)="doSign()">注　册</button>
                <p style="text-align:center;color:red">
                    {{messages}}
                </p>
                <!-- style="visibility:hidden;" -->
                <!-- [visible]='display' -->
                <!-- <a id='second' style="visibility:hidden;">将在{{identificateTime}}s后跳转到登录</a> -->
                <span>已有账号？去</span>
                <a (click)="doLogin()">登录</a>


            </form>
        </div>
    </div>
    <div>
        <!-- 提示框，隐藏IP地址 -->
        <p-dialog header="提示" [(visible)]="display" modal="modal" width="400" [responsive]="true">
            <p style="text-align:center">
                {{DiaMessage}}
            </p>

            <p-footer>
                <!-- <p> -->
                <!-- <span>{{identificateTime}}s</span>
                <span>后自动关闭</span> -->
                <!-- </p> -->
                <!-- (click)="display=false" -->
                <button type="button" pButton icon="fa-check" (click)=closeDialog() label="确定"></button>
            </p-footer>
        </p-dialog>
    </div>
</body>